<style type="text/css">
.pxtextarea[type="textarea"] {
     width: 90%; 
     box-sizing: border-box;
     -webkit-box-sizing:border-box;
     -moz-box-sizing: border-box;
}
.pxtextarea{
	position: relative;
	background-color: transparent;
	color: #999999;
	display: block;
	width: 90%; 
	margin:10px 0;
	font-size: 14px;
	padding:0 10px;
	font-family:Arial, Helvetica, sans-serif;
	border:0;
	overflow:auto;
	-webkit-appearance:none;
}
</style>
<!--{~ui('loader')->css('comment')}-->
<!--{~ui('loader')->js('@comment.ops')}-->

			<!-- 评价↓ -->
						<div class="section-detailbox">
				<section class="title">
					<h2><strong>{$summary['count']}</strong>人评价<span class="gs"><b>{$summary['average']}</b><sup>分</sup></span></h2>
				</section>
				<section class="title goods">
					<dl class="goods-txt">
					{loop $comments $comment}
											<dd>
							<div class="gs-gqul">
								<span class="name">{$comment['user_name']}</span>
								<span class="date">{echo date('Y-m-d H:i:s', $comment['timestamp_update'])}{if $comment['status'] != 'approved'}{if $comment['status']=='auditing'}审核中{/if}{if $comment['status']=='denied'}未通过{/if}{/if}</span>
								<ul class="gs_starBg">
									<li style="z-index:0; display: list-item;  width:{echo $comment['score'] * 20}%"></li>
								</ul>
							</div>
							<p>{$comment['content']}</p>
							{if $comment['reply']}
							<p class="reply"><span style="color:#009900;">回复:</span>{$comment['reply']}</p>
							{/if}
						</dd>
						{/loop}
						
											</dl>
				</section>
										</div>
			<!-- 评价↑ -->
			<!-- 我的评价团购 ↓ -->
					{if $i_buyed}		
						<div class="section-detailbox" id="recommend_show">
				<section class="title">
					<h2>我的评价<span class="gs"><sup>{if $i_buyed}
{if $comment_my}您已评价
{else}您已购买过本单，请评价
{/if}
{else}请您购买后评价{/if}</sup></span></h2>
				</section>
				<section class="title goods">
					<dl class="goods-txt">
					{if $comment_my}
											<dd>
							<div class="gs-gqul">
								<span class="name">{$comment_my['user_name']}</span>
								<span class="date">{echo date('Y-m-d H:i:s', $comment_my['timestamp_update'])}</span>
								<ul class="gs_starBg">
									<li style="z-index:0; display: list-item;  width:{echo $comment_my['score'] * 20}%"></li>
								</ul>
							</div>
							<p>{$comment_my['content']}</p>
							{if $comment_my['reply']}
							<p class="reply"><span style="color:#009900;">回复:</span>{$comment_my['reply']}</p>
							{/if}
						</dd>
						{else}
						
											</dl>
				</section>
<div id="comment-form-box" class="comment-form">
<form id="comment-form" action="index.php?mod=comment&code=submit&pid={$product_id}" method="post">
<p class="p-title">选分-点亮一颗为1分，满分为5分</p>
<p class="p-sbox">
<ul class="comment-rating comment-rating-current">
<li id="comment-score-displayer" style="z-index:0; display: list-item; width:0%;"></li>
<li id="comment-score-selector" class="comment-score-selector"></li>
</ul>
<input id="i-comment-score" type="hidden" />
</p>

<p class="p-sbox">
<textarea id="i-comment-content" class="zhaoinput" style="height:99px;overflow-y:visible"></textarea>
</p>
<p class="p-sbox">
<input id="comment-button" type="button" class="j_submit" value="发 布"  />
</p>
</form>
<div id="comment-form-loading" class="comment-form-loading"></div>
</div>

				{/if}
                 </div>
				 {/if}
			<!-- 本店其他团购 ↑ -->
<script type="text/javascript">
var commentGoodsId = '7454706';
// if document.ready
//getGoodsComment(commentGoodsId, 1);
// end if
$('#_comment_page a').live("click", function(){
var classn  = $(this).attr('class');
var nowpage = parseInt($("#nowpage").val());
var nowtext = parseInt($(this).text());
if((classn.indexOf('pageup-dis') != '-1') || (classn.indexOf('pagedown-dis') != '-1')) return false;
if(classn.indexOf('pageup') != '-1' && isNaN(nowtext))
{
var page = nowpage - 1;
}
else if(classn.indexOf('pagedown') != '-1' && isNaN(nowtext))
{
var page = nowpage + 1;
}
else
{
var page = nowtext;
}
$("#nowpage").val(page);
$("html,body").animate({scrollTop: $("#deal_comment").offset().top}, 500);
getGoodsComment(commentGoodsId, page);
});
//get comment
function getGoodsComment(goodsId, page) {        
var _url = '/ajax/getComment.php?act=comment';        
$(function(){
$.ajax({
type: "POST",
dataType:'json',
data: "goodsId="+goodsId + "&page=" + page,
url:_url,
beforeSend:function(){$('#_comment_info').html('加载中...');},
success: function(data){
if(data.code == 1) {
$('#_comment_info').html(data.html);
$('#_comment_page').html(data.page);
}
}
});
})
}
</script>